/**
 * File Manager Skill
 * 
 * A skill for comprehensive file management tasks
 */

import type { Skill } from '../skill-manager';
import {
  readFileTool,
  writeFileTool,
  listDirectoryTool,
  getFileInfoTool,
  searchFilesTool,
} from '@/tools/builtin/file-tools';

export const fileManagerSkill: Skill = {
  id: 'file-manager',
  name: 'File Manager',
  description: 'Manage files and directories with comprehensive file operations',
  category: 'file_management',
  version: '1.0.0',
  author: 'CAgent Team',
  
  tools: [
    readFileTool,
    writeFileTool,
    listDirectoryTool,
    getFileInfoTool,
    searchFilesTool,
  ],
  
  systemPrompt: `You are a file management assistant with access to comprehensive file operations.

Your capabilities include:
- Reading and writing files
- Listing directory contents
- Getting file information (size, dates, etc.)
- Searching for files by name pattern
- Organizing and managing file structures

When managing files:
1. Always confirm destructive operations before proceeding
2. Provide clear feedback about operations performed
3. Handle errors gracefully and suggest alternatives
4. Respect file permissions and security
5. Organize files logically

Be helpful and efficient in file management tasks.`,

  examples: [
    {
      title: 'Organize files',
      description: 'Organize files in a directory by type',
      input: 'Organize the files in downloads/ by file type',
      expectedOutput: 'I\'ll list the files, identify their types, and suggest an organization structure.',
    },
    {
      title: 'Find large files',
      description: 'Search for large files in a directory',
      input: 'Find all files larger than 100MB in the project directory',
      expectedOutput: 'I\'ll search recursively and list files with their sizes.',
    },
    {
      title: 'Backup files',
      description: 'Create backups of important files',
      input: 'Create backups of all .config files',
      expectedOutput: 'I\'ll search for .config files and create copies with .backup extension.',
    },
  ],
  
  metadata: {
    tags: ['files', 'management', 'organization', 'backup'],
    difficulty: 'beginner',
    estimatedSetupTime: '30 seconds',
  },
};

